<!DOCTYPE html>
<html lang="en">
        <head>
                <meta charset="UTF-8">
                <title>Title</title>
        </head>
        <script>
            $(function (){
                $("input[name='confirmPassword']").bind("blur",function (){
                    alert("密码和确认密码不相等")
                    var value1 = $("input[name='confirmPassword']").val();
                    var value2 = $("input[name='password']").val()
                    if(value1 != value2 && value2.length != 0 && value1.length != 0){
                        alert("密码和确认密码不相等")
                    }
                })
                $("input[name='password']").bind("blur",function (){
                    var value1 = $("input[name='confirmPassword']").val();
                    var value2 = $("input[name='password']").val()
                    if(value1 != value2 && value2.length != 0 && value1.length != 0){
                        alert("密码和确认密码不相等")
                    }
                })
            })
        </script>
        <body>
                <div th:replace="common/top"></div>

                <div id="BackLink">
                        <!--    <a th:href="@{viewCategory(categoryId=${product.categoryId})}"  th:text="'Rerurn to '+${product.categoryId}">Return to ***</a>-->

                        <!--    &lt;!&ndash;                        <a th:href="@{viewProduct(productId=${product.productId})}"  th:text="${product.productId}" >productId</a>&ndash;&gt;-->
                </div>

                <div id="Catalog">

                        <h2>Modify Password</h2>

                        <form action="/account/userUpdatePassword">
                                <table>
                                        <tr><th>username</th><th><input readonly="readonly" th:value="${userInfo.username}" type="text" name="username"></th></tr>
                                        <tr><th>password</th><th><input  type="text" name="password"></th></tr>
                                        <tr><th>confirmPassword</th><th><input  type="text" name="confirmPassword"></th></tr>
                                        <tr><th colspan="2" style="text-align: center"><button id="updateBtn" style="    background: linear-gradient(
                50deg,#ade6ae, #097acc);" type="submit">确认修改</button></button></th></tr>
                                </table>
                        </form>

                </div>


                <div th:replace="common/bottom"></div>

        </body>
</html>